import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import hljs from 'highlight.js'
// import '#/mixins'
// 导入组件
import packages from '../packages/index'
import DemoBlock from '@/components/DemoBlock.vue'
import icon from './json/icon-list.json'

// 公共样式
import '@/assets/css/main.scss'
// 文档 展示样式
import '@/assets/demo-styles/index.scss'

Vue.component('DemoBlock', DemoBlock)
router.afterEach(() => {
  Vue.nextTick(() => {
    const blocks = document.querySelectorAll('pre code:not(.hljs)')
    Array.prototype.forEach.call(blocks, hljs.highlightBlock)
  })
})
console.log(packages)
Vue.prototype.$icon = icon
// 注册ShUI组件
const { ShUI } = packages
Vue.use(ShUI)
new Vue({
  router,
  store,
  // i18n,
  render: h => h(App)
}).$mount('#app')
